package ro.bianca.newums;

import java.awt.ComponentOrientation;
import java.awt.GridLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class MainClass {

	public static void main(String[] args) 
	{

		JFrame studentFrame = new JFrame ("Student Frame");
		
		studentFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		studentFrame.setSize(250,250);
		
		JPanel panel = new JPanel();
		panel.setLayout(new GridLayout(0,2,3,6));
		
		JLabel firstNameLabel = new JLabel ("First Name:");
		JTextField firstNameTextField = new JTextField();
		
		JLabel lastNameLabel = new JLabel("Last Name:");
        JTextField lastNameTextField = new JTextField();
        
        JLabel idLabel = new JLabel("Id:");
        JTextField idTextField = new JTextField();
        
        JLabel studentNoLabel = new JLabel("Student No:");
        JTextField studentNoTextField = new JTextField();
        
        JLabel statusLabel = new JLabel("Status:");
        JTextField statusTextField = new JTextField();

        JButton saveStudentButton = new JButton("Save");
        
        panel.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
        
        panel.add(firstNameLabel);
        panel.add(firstNameTextField);
        panel.add(lastNameLabel);
        panel.add(lastNameTextField);
        panel.add(idLabel);
        panel.add(idTextField);
        panel.add(studentNoLabel);
        panel.add(studentNoTextField);
        panel.add(statusLabel);
        panel.add(statusTextField);
        panel.add(saveStudentButton);
        studentFrame.add(panel);
        studentFrame.setVisible(true);

	}

}
